﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using Dapper;
using zhangmenren.Db;
using zhangmenren.IService;
using zhangmenren.Models;
using zhangmenren.Repository;

namespace zhangmenren.Service
{
    public class AdminService : IAdminService
    {
        private AdminRepository repository = new AdminRepository();
        public Task<int> Add(AdminEntity admin)
        {
            return Task.FromResult(repository.Add(admin));
        }

        public Task<IEnumerable <AdminEntity>> GetAdmin(AdminEntity admin)
        {
            return Task.FromResult(repository.GetAdmin(admin));
        }
    }
}
